package cmcciot.onenet.nbapi.sdk.entity;

import cmcciot.onenet.nbapi.sdk.config.Config;
import okhttp3.HttpUrl;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
import java.util.List;

/**
 * @author LHL
 * @date: 2018/8/3
 */
public class QueryDeviceDatapointsBatch extends CommonEntity {

    private List<Long> deviceIdList;

    public QueryDeviceDatapointsBatch(List<Long> deviceIdList) {
        this.deviceIdList = deviceIdList;
    }

    @Override
    public String toUrl() {
        StringBuilder url = new StringBuilder(Config.getDomainName());
        url.append("/devices/datapoints?devIds=").append(StringUtils.join(deviceIdList, ","));
        return url.toString();
    }


}
